
public class Decodificardor {

	private String c;
	private int key;
	public Decodificardor(String c, int key) {
		super();
		this.c = c;
		this.key = key;
	}
	
	

	int in,jn;
	private char Abcbase[]={'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z','A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z'};
	
	char newAbc[], entrada[],decodificado[];
	//newAbc=new char[56];
	//entrada[c.length()];
	//codificado[c.length()];
	
	
	
	
	public char[] AbcNew(){
		for(in=0;in<56;in++){	
		newAbc[in]=Abcbase[(in-key+56)%56];
		}
		return newAbc;
	
	}
	
	public String decodificar(){
		entrada=c.toCharArray();
		char[] Abece=AbcNew();
		for(jn=0;jn<c.length();jn++){
			for(int indice=0;indice<56;indice++){
				if(entrada[jn]==Abcbase[indice]){
					decodificado[jn]=Abece[indice];
					break;
				}
			}
		}
		 String CODE= new String (decodificado);
		 return CODE;
	}
	
}
